/* 全局样式 */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-image: url('../images/background.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
}

/* 导航栏样式 */
.main-nav {
    background-color: transparent;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.nav-container {
    width: 85%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #fff;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: rgba(255, 255, 255, .5);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #fff;
}

/* 下拉菜单 */
.nav-item.dropdown {
    position: relative;
}

.nav-item.dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.dropdown-item {
    display: block !important;
    width: 100%;
    padding: 0.5rem 1rem !important;
    clear: both;
    font-weight: 400;
    color: #212529 !important;
    text-align: inherit;
    text-decoration: none !important;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}

/* 英雄区域 */
.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 2rem;
}

.hero-text h1 {
    font-size: 3rem;
    background: linear-gradient(90deg, #ff416c, #ff4b2b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.2rem;
    background: linear-gradient(90deg, red, orange, yellow, green, rgb(0, 132, 255), violet);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    max-width: 800px;
    line-height: 1.8;
}

.scroll-down-arrow {
    position: absolute;
    bottom: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

/* 布局容器 */
.container {
    width: 85%;
    margin: 2rem auto 2rem 290px;
}

.content-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    justify-content: center;
}

/* 侧边栏 */
.sidebar {
    width: 280px;
    background-color: #ffffff;
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 900;
    margin-bottom: 20px;
}

.sidebar-gradient-section {
    background: linear-gradient(135deg, #87CEEB 0%, #1E90FF 100%);
    padding: 10px;
    border-radius: 10px;
    margin: 0;
    color: white;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 12px;
}

.sidebar-nav a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.sidebar-nav a:hover {
    color: #3498db;
}

/* 右侧悬浮窗 */
#right-sidebar {
    width: 300px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    min-width: 0;
    max-width: 800px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 25px;
}

/* 帖子样式 */
.posts-container { margin-top: 20px; }

.post-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.post-title {
    color: #333;
    text-decoration: none;
}

.post-title:hover { color: #007bff; }

/* 头像样式 */
.avatar, .user-avatar, .comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.avatar { background-color: #007bff; color: white; display: flex; align-items: center; justify-content: center; font-weight: bold; }

/* 按钮样式 */
.btn {
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* 点赞按钮 */
.post-actions { margin: 15px 0; }

.like-btn {
    background: #ff4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
}

.like-btn:hover { background: #cc0000; }

/* 评论区域 */
.comments-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.comment-item {
    display: flex;
    align-items: start;
    margin: 10px 0;
    padding: 8px 0;
    color: #666;
}

.comment-form {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.comment-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.comment-submit {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.comment-submit:hover { background: #0056b3; }

/* 页脚样式 */
.main-footer {
    background-color: #e6f7ff;
    border-radius: 10px;
    color: #333;
    padding: 2rem;
    margin: 3rem auto 0;
    max-width: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.footer-content {
    width: 85%;
    margin: 0 auto;
    text-align: center;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .sidebar { display: none; }
    .container { margin: 2rem auto; }
}

/* 其他组件样式 */
.quote-section {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
}

.about-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 2px solid #ddd;
    object-fit: cover;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 10px;
    margin-bottom: 15px;
}

#address { cursor: pointer; }